package com.ihg.hiex.entity.user;

import com.demo2do.core.utils.Alias;

/**
 * 认识程度
 * 
 * @author mohanlan
 *
 */
@Alias("KnowingLevel")
public enum KnowingLevel {
    
    KNOW_WELL(1, "danger", "assessor.53"),
    
    KNOW_OF(2, "warning", "assessor.55"),
    
    NOT_KNOW(3, "default", "assessor.57");
    
    private int index;
    
    private String css;
    
    private String message;

    /**
     * @param index
     * @param css
     * @param message
     */
    private KnowingLevel(int index, String css, String message) {
        this.index = index;
        this.css = css;
        this.message = message;
    }

    /**
     * @param index
     * @return
     */
    public static KnowingLevel indexOf(int index) {
        for (KnowingLevel knowingLevel : KnowingLevel.values()) {
            if (knowingLevel.index == index) {
                return knowingLevel;
            }
        }
        return null;
    }
    
    /**
     * 
     * @return
     */
    public boolean isKnowWell() {
        return this.equals(KNOW_WELL);
    }

    /**
     * 
     * @return
     */
    public boolean isKnowOf() {
        return this.equals(KNOW_OF);
    }

    /**
     * 
     * @return
     */
    public boolean isNotKnow() {
        return this.equals(NOT_KNOW);
    }
    
    /**
     * @return the index
     */
    public int getIndex() {
        return index;
    }
    
    /**
     * @return
     */
    public String getCss() {
        return css;
    }
    
    /**
     * @return
     */
    public String getMessage() {
        return message;
    }
    
}